<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="/resources/css/admin/student/studentList.css">
	<script type="text/javascript" src="/resources/js/admin/student/studentList.js"></script>
	<title>/admin/student/studentList.jsp</title>
</head>
<body>
	<div id="studentlist"><br>
	<div id="top">관리자 >학생관리>학생정보페이지</div>		
		<form id="studentlisttop" method="post" action="/admin/student/getStudentsByBanIdx">			
			<h1 id="studenttop">학생정보페이지</h1>
				<div id="studentname">
					<label>반</label>	
					<select id="" name="banIdx">						
						<c:forEach var="ban" items="${banList}">
							<option value="${ban.banIdx}">
								${ban.banName}(${ban.banStart}~${ban.banEnd})
							</option>
						</c:forEach>								
					</select>
					<input type="submit" value="학생목록보기">
					<span id="addstudent">					
						<a href="/admin/student/addStudentForm" title="학생추가버튼" id="addbanst">[학생추가]</a>
					</span>	
				</div>
		</form>
		
		<table>			
			<tr>
				<th>학생 IDX</th>
				<th>학생 이름</th>
				<th>반 IDX</th>
				<th>반 이름</th>
				<th>비고</th>			
			</tr>
			<c:forEach var="student" items="${studentList}">
			<tr>
				<td>${student.studentIdx}</td>				
				<td>${student.studentName}</td>
				<td>${student.banIdx}</td>
				<td>${student.banName}(${student.banStart}~${student.banEnd})</td>					
				<td>
					<input type="submit" value="수정">
					<input type="submit" value="삭제">
				</td>			
			</tr>
			</c:forEach>	
			<tr >
				<td id="pagings" colspan="5" >
			<c:if test="${currentPage > 1}">
				<a href="/1" id="paging">[처음]</a>
				<a href="/${currentPage-1}" id="paging">[이전]</a>
			</c:if>
				[${currentPage}]				
			<c:if test="${currentPage < endPage}">	
				<a href="/${currentPage+1}" id="paging">[다음]</a>
				<a href="/${endPage}" id="paging">[끝]</a>
			</c:if>
				</td>	
			</tr>			
		</table>
		</div>	
			<form id="searchbox" action="">
			    <input id="search" type="text" placeholder=" 검색어를 검색해 주세요." size="50">
			    <input id="submit" type="submit" value="Search">
			</form>		
</body>
</html>